import React, { Component } from 'react';

export default class MenuExampleColoredInverted extends Component {
  state = { hover: false };
  handleMouseInter = () => this.setState({ hover: true })
  handleMouseLeave = () => this.setState({ hover: false })
  render() {
    const { hover } = this.state;
    const { children, active } = this.props;
    let classString = "label-item label-buttonItem label-h4 ";
    if (hover === true) {
      classString += "label-itemHover ";
    }
    if (active) {
      classString += "label-itemActive ";
    }
    return (
      <a
        className={classString}
        onMouseEnter={() => this.handleMouseInter()}
        onMouseLeave={() => this.handleMouseLeave()}
      >
        {children}
      </a>
    );
  }
}